/***************************************************
> Copyright (C) 2024 ==KINGYI== All rights reserved.
> File Name: 1.c
> Author:cjy
> Mail: 
> Created Time: 2024年08月06日 星期二 16时00分59秒
***************************************************/
//设计一个求正切值的函数    res = funtang(sin,cos,arg)
#include <stdio.h>
#include <math.h>
double sin_num(int arg);
double cos_num(int arg);
typedef double (*FUN)(double,double);

double sin_num(int arg){
	double s_num = sin(arg);
	return s_num;
}
double cos_num(int arg){
	double c_num = cos(arg);
	return c_num;
}

double tan_num(double c_num,double s_num){
	double tan_num = s_num / c_num;
	return tan_num;
}


int main(int argc,const char* argv[])
{
	int arg = 0;
	printf("请输入一个度:");
	scanf("%d",&arg);
	FUN p = 0;
	p = tan_num;
	double res = 0;
	res = (*p)(cos_num(arg),sin_num(arg));
	printf("正切值:%lf",res);
	
    return 0;
}
